<?php

// Error reporting ON
error_reporting(E_ALL);
ini_set('display_errors', '1');

// Including library
require 'innoTweetsAuth.php';

// Setting app token & callback url
$myAppToken = '7c9f7e5921d8f07e5a95cedf11598e07';
$myAppCallback = 'http://192.168.1.124/www/innoTweets/extras/api/apiLogin.php';

$innoTweetsAuth = new innoTweetsAuth($myAppToken, $myAppCallback);

/**
 * CASE 1
 * 
 */
// Get the user token. Keep this for future use
$userToken = $innoTweetsAuth->getUserToken();

// If dont have user token yet
$user_data_1 = $innoTweetsAuth->getUser();

print_r($user_data_1);

/**
 * CASE 2
 * 
 */
// If already have user token
$user_data_2 = $innoTweetsAuth->userToken($userToken)->getUser();

print_r($user_data_2);
?>